﻿<%@ Page Title="Mobilhjulskift.dk - Betal dit abonnement online" Language="C#" MasterPageFile="~/WebsiteSub.Master" AutoEventWireup="true" CodeBehind="Betal.aspx.cs" Inherits="TireService.Website.Betal" %>

<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.12.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.12.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.12.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">

    <!-- Google Code for K&oslash;b af abonnement Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 977559891;
    var google_conversion_language = "da";
    var google_conversion_format = "1";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "t8R7CJ2vvAIQ08KR0gM";
    var google_conversion_value = 0;
    if (999) {
      google_conversion_value = 999;
    }
    /* ]]> */
    </script>
    <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/977559891/?value=999&amp;label=t8R7CJ2vvAIQ08KR0gM&amp;guid=ON&amp;script=0"/>
    </div>
    </noscript>


    <!-- Modal popup when waiting on server postback -->
    <script src="Scripts/ModalPopup.js" type="text/javascript"></script>

    <asp:UpdatePanel ID="upPayment" runat="server">
        <ContentTemplate>
            <div id="box1">
                <h1>Betaling</h1>
                <hr />
                <asp:Panel ID="pMessage" runat="server" Visible="false">
                    <asp:Literal ID="lMessage" runat="server"></asp:Literal>
                </asp:Panel>

                <asp:Panel ID="pPaymentCompleted" runat="server" Visible="false">
                    Tak for din betaling og endnu engang tillykke med dit nye mobilhjulskift.dk abonnement.<br /><br />
                    Faktura kan ses her: <a href="#" id="lnkInvoice" target="_blank" runat="server">Se Faktura</a><br /><br />
                    Der er blevet sendt en email med yderligere oplysninger til dig.
                </asp:Panel>

                <asp:Panel ID="pPaymentFailed" runat="server" Visible="false">
                    Der opstod en fejl og din betaling kunne ikke gennemføres. Venligst prøve igen.
                </asp:Panel>

                <asp:Panel ID="pPaymentCancel" runat="server" Visible="false">
                    Du annullerede betalingsprocessen før den blev gennemført. Husk at indbetale faktura for din abonnement på et senere tidspunkt.<br /><br />
                    Det er først når vi har modtaget din betaling vi påbegynder planlægning af dit næste hjulskift.
                </asp:Panel>

                <asp:Panel ID="pPaypalPayment" runat="server" Visible="false">
                    <p>
                        <b>Betaling med kreditkort via PayPal</b>
                        <asp:HiddenField ID="hfCustomerId" runat="server" />
                        <asp:HiddenField ID="hfEmail" runat="server" />
                    </p>
                    <asp:Button ID="btnPaypalPayment" runat="server" Text="Gå til betaling" OnClick="btnPaypalPayment_Click" />
                </asp:Panel>

                <asp:Panel ID="pOnlinePayment" runat="server" Visible="false">
                    <p>
                        <b>Betaling med Visa/DK kort</b>
                    </p>
                    <dx:ASPxHyperLink ID="hlInvoice" runat="server" Target="_blank" Text="Se faktura">
                    </dx:ASPxHyperLink><br />
                    <dx:ASPxLabel ID="lblAmount" runat="server" Text="">
                    </dx:ASPxLabel>
                    <br />
                    <table>
                        <tr>
                            <td colspan="2">
                                <dx:ASPxLabel ID="lblCarNumber" runat="server" Text="Kortnummer" >
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <dx:ASPxTextBox ID="txtCardNumber" runat="server" Width="120px" >
                                    <MaskSettings Mask="0000-0000-0000-0000" ErrorText="Kortnummer skal udfyldes med 16 tal" />
                                    <ValidationSettings RequiredField-IsRequired="true" RequiredField-ErrorText="Kortnummer skal udfyldes" ErrorDisplayMode="ImageWithTooltip" ValidationGroup="Payment" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <dx:ASPxLabel ID="lblExpireDate" runat="server" Text="Udløbsdato (MM/YY)" >
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <dx:ASPxComboBox ID="ddlExpireMonth" runat="server" Width="50px" Spacing="0">
                                    <Items>
                                        <dx:ListEditItem Selected="true" Value="01" Text="01"  />
                                        <dx:ListEditItem Value="02" Text="02"  />
                                        <dx:ListEditItem Value="03" Text="03"  />
                                        <dx:ListEditItem Value="04" Text="04"  />
                                        <dx:ListEditItem Value="05" Text="05"  />
                                        <dx:ListEditItem Value="06" Text="06"  />
                                        <dx:ListEditItem Value="07" Text="07"  />
                                        <dx:ListEditItem Value="08" Text="08"  />
                                        <dx:ListEditItem Value="09" Text="09"  />
                                        <dx:ListEditItem Value="10" Text="10"  />
                                        <dx:ListEditItem Value="11" Text="11"  />
                                        <dx:ListEditItem Value="12" Text="12"  />
                                    </Items>
                                    <ValidationSettings RequiredField-IsRequired="true" RequiredField-ErrorText="Udløbs måned skal udfyldes" ValidationGroup="Payment"></ValidationSettings>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                </dx:ASPxComboBox>
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="ddlExpireYear" runat="server" Width="50px" Spacing="0" >
                                    <Items>
                                        <dx:ListEditItem Selected="true" Value="11" Text="11"  />
                                        <dx:ListEditItem Value="12" Text="12"  />
                                        <dx:ListEditItem Value="13" Text="13"  />
                                        <dx:ListEditItem Value="14" Text="14"  />
                                        <dx:ListEditItem Value="15" Text="15"  />
                                        <dx:ListEditItem Value="16" Text="16"  />
                                        <dx:ListEditItem Value="17" Text="17"  />
                                        <dx:ListEditItem Value="18" Text="18"  />
                                    </Items>
                                    <ValidationSettings RequiredField-IsRequired="true" RequiredField-ErrorText="Udløbs år skal udfyldes" ValidationGroup="Payment"></ValidationSettings>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <dx:ASPxLabel ID="lblSecurityNumber" runat="server" Text="CVC" >
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <dx:ASPxTextBox ID="txtCVC" runat="server" Width="30px" >
                                    <MaskSettings Mask="000" ErrorText="Sikkerhedskode skal angives med 3 tal" />
                                    <ValidationSettings RequiredField-IsRequired="true" RequiredField-ErrorText="Sikkerhedskode skal udfyldes" ErrorDisplayMode="ImageWithTooltip" ValidationGroup="Payment" />
                                </dx:ASPxTextBox>
                                <asp:HiddenField ID="hfAmount" runat="server" />
                                <asp:HiddenField ID="hfInvoiceId" runat="server" />
                                <asp:HiddenField ID="hfInvoiceGuid" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <dx:ASPxHyperLink ID="hlCreditCardGuide" runat="server" NavigateUrl="~/Betalingsvejledning.aspx" Target="_blank" Text="Betalingsvejledning">
                                </dx:ASPxHyperLink>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <dx:ASPxButton ID="btnPayment" runat="server" Text="Betal" ValidationGroup="Payment" onclick="btnPayment_Click">
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>


</asp:Content>
